module.exports = {
    // 平台菜单类型
    PlatformMenuTypes: 'SELECT * FROM #schema.mfplatformmenutype ORDER BY sortnum ASC;',

    // 平台角色列表
    PlatformRoles: `SELECT RoleName FROM #schema.mfplatformrole WHERE configrights IS NOT NULL AND configrights<>'[]';`,

    // 菜单详情
    PlatformMenuDetails: `SELECT
                            DISTINCT(b.PageID),
                            a.menuType,
                            a.Name,
                            a.Level,
                            a.IsValid,
                            b.PageKey,
                            b.PageTitle,
                            CASE 
                            WHEN LCASE(UserDefineType)='url' THEN b.Assembly
                            ELSE CONCAT('/App/Biz/',b.PageKey)
                            END url,
                            (
                              SELECT GROUP_CONCAT(DISTINCT(rolename)) FROM #schema.mfplatformrole WHERE configrights LIKE CONCAT('%', b.PageID, '%')  
                            ) AS RoleNmaes
                        FROM #schema.mfplatformmenu a
                        INNER JOIN #schema.mfplatformfunction b ON a.PluginID=b.PageID
                        where a.menutype = @menuType
                        ORDER BY ordernum ASC;`
};